<?php
class ymdian_pay_logControl extends skymvc{
	
	public function __construct(){
		parent::__construct();
	}
	
	public function onDefault(){
		$where=" isdelete=0 AND shopid=".SHOPID;
		$start=get('per_page','i');
		$limit=20;
		$url=APPYMDIAN."?m=ymdian_pay_log";
		$k=get('k','h');
		if($k){
			$where.=" AND k='".$k."'";
			$url.="&k=".$k; 
		}
		$option=array(
			"where"=>$where,
			"start"=>$start,
			"limit"=>$limit,
			"order"=>" id DESC",
		);
		$rscount=true;
		$data=M("ymdian_pay_log")->select($option,$rscount);
		$pagelist=$this->pagelist($rscount,$limit,$url);
		$this->smarty->assign(array(
			"list"=>$data,
			"rscount"=>$rscount,
			"pagelist"=>$pagelist
			
		));
		
		$this->smarty->display("pay_log/index.html");
	}
	
}
?>